﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MINERP.BLL.PhotoRindGrid;
using MINERP.MODEL.FoundationModel;

namespace MINERP.PhotoRindGrid.Forms
{
    public partial class FrmSearch : Form
    {
        public FrmSearch(List<string> inShopNameList)
        {
            InitializeComponent();
            shopNameList = inShopNameList.OrderBy(p=>p).ToList();
        }
        List<string> shopNameList = new List<string>();
        PhotoRindGridBLL2 _bll = new PhotoRindGridBLL2();
        public delegate void SendSearch(int shopId,string shopName);
        public event SendSearch SendGridColor; 

        private void FrmSearch_Load(object sender, EventArgs e)
        {

            comboBoxShopList.DataSource = shopNameList;
        }

        private void btnSure_Click(object sender, EventArgs e)
        {
            shopName = comboBoxShopList.Text.ToString();
                SendGridColor(shopid, shopName);
                this.Close();
         }
        int shopid = 0;
        string shopName="";

        private void comboBoxShopList_DropDownClosed(object sender, EventArgs e)
        {
            //Shop_Info shop = ((Shop_Info)comboBoxShopList.SelectedItem);
            //shopid = shop.ShopId;
            //shopName = shop.ShopName;
            shopName=comboBoxShopList.Text.ToString();
        }
       
    }
}
